import java.io.FileInputStream;
import java.io.ObjectInputStream;
import java.io.IOException;
import java.io.Serializable;
import java.lang.ClassNotFoundException;

class DeserializeDemo
	{
	public static void main(String args[])
		{
		Employee e = null;
		try
			{
			FileInputStream fin = new FileInputStream("employee.ser");
			ObjectInputStream oin = new ObjectInputStream(fin);
			e = (Employee) oin.readObject();
			oin.close();
			fin.close();
			}
		catch(IOException ie)
			{
			ie.printStackTrace();
			return;
			}
		catch(ClassNotFoundException cnfe)
			{
			System.out.println("Employee class not found");
			cnfe.printStackTrace();
			return;
			}
		System.out.println("Deserialized Employee...");
		System.out.println("Name : " + e.name);
		System.out.println("Address : " + e.address);
		System.out.println("SSN : " + e.SSN);
		System.out.println("Number : " + e.number);	
		}
	}